package com.xdhl.fu.member.controller;

import com.xdhl.fu.common.core.web.domain.AjaxResult;
import com.xdhl.fu.member.domain.Province;
import com.xdhl.fu.member.service.IProvinceService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 省份控制器
 *
 * @author 朱力维
 * @time 2022/7/2 16:11
 */
@RestController
@RequestMapping("/province")
public class ProvinceController {
    @Resource
    private IProvinceService provinceService;

    /**
     * 获取省份列表
     *
     * @return 所有省份
     */
    @GetMapping("/list")
    public AjaxResult list() {
        List<Province> list = provinceService.list();
        return AjaxResult.success(list);
    }
}
